$OpenBSD: patch-Imakefile,v 1.6 2013/06/04 15:41:17 naddy Exp $
--- Imakefile.orig	Sun Jun 18 15:58:50 2006
+++ Imakefile	Tue Jun  4 10:57:37 2013
@@ -1,5 +1,5 @@
 XCOMM Should install to /usr or /usr/local ??
-DESTDIR=/usr
+#DESTDIR=/usr
 
 XCOMM Name of man subdirectory of DESTDIR:
 MANDIR=/X11R6/man/man1
@@ -8,7 +8,7 @@ XCOMM Name of bin subdirectory of DESTDIR: /X11R6/bin 
 BINDIR=/X11R6/bin
 
 XCOMM Name of share subdirectory of DESTDIR:
-SHAREDIR=/share/sunclock
+SHAREDIR=${PREFIX}/share/sunclock
 
 XCOMM Name of DOCDIR's subdirectories of DESTDIR:
 DOCDIR=/X11R6/lib/X11/doc 
@@ -42,31 +42,24 @@ CCOPTIONS = -Ae $(XPMINC) $(JINC) -DZLIB -DSHAREDIR=\"
 #CCOPTIONS=-O -DZLIB -DNEW_CTIME -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
 
 # Solaris, Linux
-#XPMLIBDIR=-L/usr/X11R6/lib
-#XPMINC=-I/usr/X11R6/include/X11
-#JLIBDIR=-L/usr/lib
-#ZLIBDIR=-L/usr/lib
-#JINC=-I/usr/include
+XPMLIBDIR=-L${X11BASE}/lib
+XPMINC=-I${X11BASE}/include/X11
+JLIBDIR=-L${LOCALBASE}/lib
+ZLIBDIR=
+JINC=-I${LOCALBASE}/include
 
-CCOPTIONS=-O -DZLIB -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
+CCOPTIONS+= $(JINC) $(PINC) $(XPMINC) -DZLIB -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
 #endif
 
 SRCS=sunclock.c astro.c widgets.c tildepath.c dirlist.c \
      readvmf.c readxpm.c readgif.c readjpeg.c readpng.c
 OBJS=sunclock.o astro.o widgets.o tildepath.o dirlist.o \
      readvmf.o readxpm.o readgif.o readjpeg.o readpng.o
-LOCAL_LIBRARIES=$(XLIB) $(XPMLIBDIR) -lXpm $(ZLIBDIR) -lz \
+LOCAL_LIBRARIES=$(XPMLIBDIR) -lXpm $(XLIB) $(ZLIBDIR) -lz \
      $(JLIBDIR) -ljpeg -lpng -lm
 DEPLIBS=		# I don't know what I'm doing, and I hate imake!
 
 ComplexProgramTarget(sunclock)
-
-all::
-	cd editkit ; xmkmf ; make emx \
-          DESTDIR=$(DESTDIR) \
-	  BINDIR=$(SHAREDIR)/bin \
-	  MANDIR=$(SHAREDIR)/editkit \
-	  SHAREDIR=$(DESTDIR)$(SHAREDIR)/editkit
 
 install.man::
 	if [ -r $(DESTDIR)$(MANDIR)/sunclock.1x.gz ] ; \
